/*
 * @Description: 
 * @Author: 赵大壮
 * @Date: 2021-12-07 20:01:31
 * @LastEditTime: 2021-12-08 09:58:31
 * @LastEditors: 赵大壮
 */
import nyNetwork from "@/api/nyBaseNetwork";
import nyMessageToast from "@/utils/NYMessageToast";
class DZUserService {

    s_username = '';
    s_password = '';

    m_user = null;



    doLogin(success: (res: any) => void) {
        if (this.s_username.nyIsEmpty()) {
            nyMessageToast.warning("请输入用户名")
            return
        }

        if (this.s_password.nyIsEmpty()) {
            nyMessageToast.warning("请输入密码")
            return
        }
        var params = {
            account: this.s_username,
            password: this.s_password
        };

        var that = this;
        nyNetwork.net('登录', params, (data) => {
            success(data)
        });
    }

    net_edit_pwd(newPwd, success: () => void) {
        nyNetwork.net('修改密码', { password: newPwd }, (data) => {
            success();
        });
    }

}

export default DZUserService
